package com.duruikang.LeaveAPI.form;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.time.LocalDate;

/**
 * 生成请假单提交的表单
 *
 * @author szh
 */
@Data
public class LeavingForm {

    /**
     * 包含用户信息的字符串
     */
    @NotEmpty
    private String token;

    /**
     * 可选理由
     */
    @NotBlank
    private String leavingReason;

    /**
     * 地址
     */
    @NotNull
    private String leavingDestination;

    /**
     * 事由描述
     */
    @NotNull
    private String leavingDetail;

    /**
     * 开始时间
     */
    @NotNull
    private LocalDate leavingStart;

    /**
     * 结束时间
     */
    @NotNull
    private LocalDate leavingEnd;
}
